JavaScript Programming

Names and values

Names and values are not together in programming. The way to think of names and values in
programming is to think of names as they were titles and offices in order for this to work properly
you need to make sure that they all have other designations purposely selected to have changing values for example.
Name: Prime Minister

Current Value : Gordon Brown

Previous Values : Tony Blair, Margeret Thatcher

Every single variable has to be declared. JavaScript allows declaration statements anywhere in the list of program statements,
because variable declarations announce what variables will be used programmers tend to place them first in the program.

Declaration

The declaration states that identifiers, is the name of the variable. This has no value at first simply
because the declared variable is not defined. It's a name that doesn't yet name anything.
For example when a group form an intramural football team say Crack, the office can refer to the Crack
captain even if the person hasn't been chosen. This name is declared - and it will be meaningful in
the long run but because there is no value assigned this makes the value Undefined.

The values assigned to the variables taxrate and balanceDue are numbers.
Everything in programming has rules for example there are rules for writing numbers but basically numbers are
written in the normal way. A unusual aspect of numbers in programming is that there's no units for
instance you cannot write 55% or £7.09 you instead write 0.55 and 7.09.



©JavaScript Programming 2011